package com.common.controller;

import com.common.annotation.LogAnnotation;
import com.common.dto.OperationLogDTO;
import com.common.service.OperationLogService;
import com.common.util.ConstantDefine;
import com.common.util.LogType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping(value = "/operationLog")
public class OperationLogController {

      @Autowired
      private OperationLogService operationLogService;

      @ResponseBody
      @RequestMapping(value = ConstantDefine.LIST_REQ)
      @LogAnnotation(description = "操作记录页面显示", bizID = LogType.LOG)
      public Object queryByEntity(@RequestBody OperationLogDTO entity) {
            Map<String, Object> map = operationLogService.selectByPaging(entity);
            return map;
      }


}